//
//  CommonTools.swift
//  WeiBo
//
//  Created by 韩俊 on 15/12/9.
//  Copyright © 2015年 HanJun. All rights reserved.
//

import UIKit

let HMSwitchRootVCNotifation = "HMSwitchRootVCNotifation"

let SCREENW = UIScreen.mainScreen().bounds.size.width
let SCREENH = UIScreen.mainScreen().bounds.size.height



// MARK: - 快速创建颜色
func RGB(red red:CGFloat, green:CGFloat, blue:CGFloat) -> UIColor {
    
    
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: 1)
}




// MARK: - 随机颜色


func randomColor() -> UIColor {
    
    return RGB(red: CGFloat(random() % 256), green: CGFloat(random() % 256), blue: CGFloat(random() % 256))
}



func printLog(
    message: Any,
    file: String = __FILE__,
    line: Int = __LINE__,
    mthName: String = __FUNCTION__
    ) {
        #if DEBUG
            __LINE__
            print("\((file as NSString).lastPathComponent)[\(line)], \(mthName): \(message)")
        #endif
}

